package at.fhhagenberg.mcm09.elevator.model;

import java.util.Iterator;
import java.util.LinkedList;
import java.util.Queue;

public class RequestModel {
	
	private Queue<StopRequest> stopQueue;

	public RequestModel(){	
		stopQueue = new LinkedList<StopRequest>();
	}
	
	public Queue<StopRequest> getStopQueue() {
		return stopQueue;
	}
	
	public LinkedList<StopRequest> getLinkedStopQueue(){
		return (LinkedList<StopRequest>)stopQueue;
	}
	
	public void setStopQueue(Queue<StopRequest> stopQueue) {
		this.stopQueue = stopQueue;
	}
	public boolean addRequest(StopRequest stopRequest) {
	
		if(stopQueue.contains(stopRequest)){
			return false;	
		}
		stopQueue.add(stopRequest);	
		return true;
	}
	
	public boolean removeRequest(StopRequest stopRequest) {
		
		return stopQueue.remove(stopRequest);
		
	}


	

}
